<template>
	<view class="goods-list" v-show="total">
		<u-navbar
		 :border-bottom="false" back-icon-color="#fff"
		 :background="{backgroundImage:'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'}">
				 <my-fenlei-search style="width:100%;"></my-fenlei-search>
		</u-navbar>
		
		
		<my-list-item :leftList="leftList" :rightList="rightList" :state="state" @gotoDetail="gotoDetail"></my-list-item>
		
	</view>
</template>

<script>
	import getGoodsMix from '../../mixins/get-goods.js'
	export default {
		data() {
			return {
				defaultPic:'https://img3.doubanio.com/f/movie/8dd0c794499fe925ae2ae89ee30cd225750457b4/pics/movie/celebrity-default-medium.png',
				scrollTop: 0
			};
		},
		mixins:[getGoodsMix],
		//下拉刷新的事件
		onPullDownRefresh(){
			this.queryObj.pagenum = 1
			this.total = 0
			this.isDownExecute = false
			this.goodsList = []
			
			this.getGoodsList(()=> uni.stopPullDownRefresh())
		}
	}
</script>

<style>
	/* page不能写带scope的style标签中，否则无效 */
	page {
		background-color: rgb(240, 240, 240);
	}
</style>

<style lang="scss" scoped>

	.demo-warter {
		border-radius: 8px;
		margin: 5px;
		background-color: #ffffff;
		padding: 8px;
		position: relative;
	}
	
	.u-close {
		position: absolute;
		top: 32rpx;
		right: 32rpx;
	}
	
	.demo-image {
		width: 100%;
		border-radius: 4px;
	}
	
	.demo-title {
		font-size: 30rpx;
		margin-top: 5px;
		color: $u-main-color;
	}
	
	.demo-tag {
		display: flex;
		margin-top: 5px;
	}
	
	.demo-tag-owner {
		background-color: $u-type-error;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		padding: 4rpx 14rpx;
		border-radius: 50rpx;
		font-size: 20rpx;
		line-height: 1;
	}
	
	.demo-tag-text {
		border: 1px solid $u-type-primary;
		color: $u-type-primary;
		margin-left: 10px;
		border-radius: 50rpx;
		line-height: 1;
		padding: 4rpx 14rpx;
		display: flex;
		align-items: center;
		border-radius: 50rpx;
		font-size: 20rpx;
	}
	
	.demo-price {
		font-size: 30rpx;
		color: $u-type-error;
		margin-top: 5px;
	}
	
	.demo-shop {
		font-size: 22rpx;
		color: $u-tips-color;
		margin-top: 5px;
	}
</style>
